package com.aa.studentmanage.ui;

import com.aa.studentmanage.entity.StudentEntity;
import com.aa.studentmanage.main.DataInt;
import com.aa.studentmanage.utils.InputHelper;

public class AdminMenu {
    /*
     * 管理员主菜单
     * */
    public static int adminMainMenu(){
        System.out.println("----------------------------------------------------");
        System.out.println();
        System.out.println("\t\t\t\t管 理 员 主 菜 单");
        System.out.println();
        System.out.println("\t\t\t\t 1、新 增 学 生");
        System.out.println("\t\t\t\t 2、修 改 学 生");
        System.out.println("\t\t\t\t 3、删 除 学 生");
        System.out.println("\t\t\t\t 4、查 询 学 生");
        System.out.println("\t\t\t\t 0、返 回 上 级");
        System.out.println();
        System.out.println("----------------------------------------------------");
        System.out.print("请选择(0-4):");
        return InputHelper.getInt();
    }

    /*
     * 添加学生的菜单
     * */
    public static StudentEntity addStudentMenu(){
        System.out.print("请输入学生姓名:");
        String stuName = InputHelper.getString();
        System.out.print("请输入学生性别:");
        String stuSex = InputHelper.getString();
        System.out.print("请输入学生年龄:");
        int stuAge = InputHelper.getInt();
        System.out.print("请输入学生班级:");
        String stuClasses = InputHelper.getString();
        System.out.print("请输入学生住址:");
        String stuAddress = InputHelper.getString();
        return new StudentEntity(DataInt.stuId++,"123456",stuName,stuSex,stuAge,stuClasses,stuAddress);
    }

    public static int modifyStudentMenu(){
        System.out.println("----------------------------------------------------");
        System.out.println();
        System.out.println("\t\t\t\t 1、按照学号修改");
        System.out.println("\t\t\t\t 0、返 回 上 级");
        System.out.println();
        System.out.println("----------------------------------------------------");
        System.out.print("请选择(0-1):");
        return InputHelper.getInt();
    }

    /*
    * 查询学生
    * */
    public static int inquireStudentMenu(){
        System.out.println("----------------------------------------------------");
        System.out.println();
        System.out.println("\t\t\t\t 1、查询所有学生");
        System.out.println("\t\t\t\t 2、按照学号查询");
        System.out.println("\t\t\t\t 3、按照性别查询");
        System.out.println("\t\t\t\t 4、按照班级查询");
        System.out.println("\t\t\t\t 0、返 回 上 级");
        System.out.println();
        System.out.println("----------------------------------------------------");
        return InputHelper.getInt();
    }
    /*
     * 学生数据标题
     * */
    public static void studentListTitle(){
        System.out.printf("%-8s","学号");
        System.out.printf("%-8s","姓名");
        System.out.printf("%-8s","性别");
        System.out.printf("%-8s","年龄");
        System.out.printf("%-8s","班级");
        System.out.printf("%-8s","家庭住址");
        System.out.println();
    }
}
